home *** CD-ROM | disk | FTP | other *** search
/ SGI Hot Mix 17 / Hot Mix 17.iso / HM17_SGI / research / lib / obsolete / cosines.pro < prev    next >
Text File  |  1997-07-08  |  779b  |  35 lines

  1. ; $Id: cosines.pro,v 1.2 1997/01/15 04:02:19 ali Exp $
  2. ;
  3. ; Copyright (c) 1987-1997, Research Systems, Inc.  All rights reserved.
  4. ;       Unauthorized reproduction prohibited.
  5.  
  6. function cosines,x,m
  7. ;+
  8. ; NAME:
  9. ;    COSINES
  10. ;
  11. ; PURPOSE:
  12. ;    Example of a function to be used by SVDFIT.  Returns cos(i*cos(x(j)).
  13. ;
  14. ; CATEGORY:
  15. ;    Curve fitting.
  16. ;
  17. ; CALLING SEQUENCE:
  18. ;    Result  = COSINES(X, M)
  19. ;
  20. ; INPUTS:
  21. ;    X:  A vector of data values with N elements.
  22. ;    M:  The order, or number of terms.
  23. ;
  24. ; OUTPUTS:
  25. ;    Function result = (N,M) array, where N is the number of points in X,
  26. ;    and M is the order.  R(I,J) = cos(J * X(I))
  27. ;
  28. ; MODIFICATION HISTORY:
  29. ;    DMS, Nov, 1987.
  30. ;-
  31. on_error,2                  ;Return to caller if an error occurs
  32. return,cos( x # findgen(m)) ;Couldn't be much simpler
  33. end
  34.  
  35.